import axios from 'axios'
import env from './env'

let baseAxios = axios.create({
    baseURL: env.url,
});

baseAxios.getUrl = (...params) => {
    return new Promise(function (resolve, reject) {
        baseAxios.get(...params).then(response => {
            var retData = response.data;
            resolve(retData, response);
        }, error => {
            console.log(error);
            reject(error);
        });
    });

}

// TODO
export default baseAxios;
